import request from '@/utils/request'

// 查询订单列表列表
export function listCustomerorder(query) {
  return request({
    url: '/CustomerorderMain/customerorder/list',
    method: 'get',
    params: query
  })
}

export function listCustomerorder2(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listout',
    method: 'get',
    params: query
  })
}

// 查询订单列表列表
export function listCustomerorderAll(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listAll',
    method: 'get',
    params: query
  })
}
// 查询订单列表列表
export function listOrderItem(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listOrdItem',
    method: 'get',
    params: query
  })
}

export function listOrderItem2(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listOrdItem2',
    method: 'get',
    params: query
  })
}
// 查询到期订单列表列表
export function listCustomerorderDq(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listDq',
    method: 'get',
    params: query
  })
}
// 查询到期订单列表列表-汇总
export function listCustomerorderDqHz(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listDqhz',
    method: 'get',
    params: query
  })
}
// 查询到期订单列表列表-汇总金额
export function selectdqhzje(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listDqhzje',
    method: 'get',
    params: query
  })
}
// 查询订单列表列表
export function listCustomerordersum(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listCustomerordersum',
    method: 'get',
    params: query
  })
}

// 查询订单列表列表
export function listCustomerorderItem(query) {
  return request({
    url: '/CustomerorderlineMain/customerorderline/list',
    method: 'get',
    params: query
  })
}
// api客户订单列表
export function listCustomerorder1(query) {
  return request({
    url: '/CustomerorderMain/customerorder/listdd',
    method: 'get',
    params: query
  })
}
 //  分配用户
export function selectywy(data) {
  return request({
    url: '/CustomerorderMain/customerorder/selectywy',
    method: 'get',
    params: data
  })
}
 //  分配用户
 export function updateqdc(data) {
  return request({
    url: '/CustomerorderMain/customerorder/updateqdc',
    method: 'get',
    params: data
  })
}
 // 同步订单数据
 export function tblistCustomerorder(query) {
  return request({
    url: '/CustomerorderMain/customerorder/tblistCustomerorder',
    method: 'put',
    data: query
 
  })
}

 // 同步订单数据对应业务员
 export function tbywy(query) {
  return request({
    url: '/CustomerorderMain/customerorder/tbywy',
    method: 'get',
    params: query
 
  })
}

// 导入订单数据
export function ImportCustomerorder(orderId) {
  return request({
    url: '/CustomerorderMain/customerorder/ImportOrder/' + orderId,
    method: 'get'
  })
}

//写入订单详情
export function insertxq(data) {
  return request({
    url: '/CustomerorderMain/customerorder/insertxq',
    method: 'get',
    params: data
  })
}

// 查询订单列表详细
export function getCustomerorder(orderId) {
  return request({
    url: '/CustomerorderMain/customerorder/' + orderId,
    method: 'get'
  })
}

// 新增订单列表
export function addCustomerorder(data) {
  return request({
    url: '/CustomerorderMain/customerorder',
    method: 'post',
    data: data
  })
}

// 修改订单列表
export function updateCustomerorder(data) {
  return request({
    url: '/CustomerorderMain/customerorder',
    method: 'put',
    data: data
  })
}

// 删除订单列表
export function delCustomerorder(orderId) {
  return request({
    url: '/CustomerorderMain/customerorder/' + orderId,
    method: 'delete'
  })
}

//查询月返季返点按需
export function selectPerformanceMonth(query){
  return request({
    url:'/CustomerorderMain/performance/month',
    method:'get',
    params: query
  })
}

//查询季返季返点按需
export function selectPerformanceSeason(query){
  return request({
    url:'/CustomerorderMain/performance/season',
    method:'get',
    params: query
  })
}